#include "WidgetVariantButton.h"
#include "ui_WidgetVariantButton.h"
#include <iostream>
#include <WidgetsManager.h>
WidgetVariantButton::WidgetVariantButton(QWidget *parent) :
    WidgetVariant(parent),
    ui(new Ui::WidgetVariantButton)
{
    ui->setupUi(this);
}

WidgetVariantButton::~WidgetVariantButton()
{
    delete ui;
}

void WidgetVariantButton::refreshByProperty(EItemMetaPropertyPtr p)
{
    this->clearConnect();
    WidgetVariant::refreshByProperty(p);
    this->buildConnect();
}

void WidgetVariantButton::buildConnect()
{
	QObject::connect(ui->pushButton, SIGNAL(clicked(bool)), this, SLOT(slotButtonClicked(bool)));
}

void WidgetVariantButton::clearConnect()
{
	QObject::disconnect(ui->pushButton, SIGNAL(clicked(bool)), this, SLOT(slotButtonClicked(bool)));
}

void WidgetVariantButton::slotButtonClicked(bool clicked)
{

}
